home *** CD-ROM | disk | FTP | other *** search
-
-
-
- hhhhoooogggg((((1111CCCC)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((CCCCMMMMDDDD)))) hhhhoooogggg((((1111CCCC))))
-
-
-
- NNNNAAAAMMMMEEEE
- memhog - memory hog analyser
- cpuhog - cpu hog analyser
- iohog - I/O hog analyser
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- mmmmeeeemmmmhhhhoooogggg [ ----pppp _n_u_m ] [ ----cccc _c_o_l_s ] [ ----llll _l_i_n_e_s ] [ ----wwww ] [ ----tttt ] [
- ----iiii _i_n_t_e_r_v_a_l ] [ ----ssss _s_m_o_o_t_h ] [ ----DDDD ] [ ----TTTT ] [ ----VVVV ]
- iiiioooohhhhoooogggg [ ----pppp _n_u_m ] [ ----cccc _c_o_l_s ] [ ----llll _l_i_n_e_s ] [ ----wwww ] [ ----tttt ] [ ----iiii
- _i_n_t_e_r_v_a_l ] [ ----ssss _s_m_o_o_t_h ] [ ----dddd char | swap ] [ ----DDDD ] [ ----TTTT ] [
- ----VVVV ]
- ccccppppuuuuhhhhoooogggg [ ----pppp _n_u_m ] [ ----cccc _c_o_l_s ] [ ----llll _l_i_n_e_s ] [ ----wwww ] [ ----tttt ] [
- ----iiii _i_n_t_e_r_v_a_l ] [ ----ssss _s_m_o_o_t_h ] [ ----dddd system | user | load ] [ ----VVVV
- ] [ ----%%%% ] [ ----DDDD ] [ ----TTTT ]
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The _h_o_g commands analyse resource use by processes. The _h_o_g
- commands all work in the same basic way, but observe the
- consumption of different resources. _m_e_m_h_o_g examines memory
- use, _c_p_u_h_o_g examines processor use, and _i_o_h_o_g examines I/O
- use. In the following discussion, _h_o_g means one of the
- possible invocations (e.g., memhog), and _r_e_s_o_u_r_c_e refers to
- the resource in which that _h_o_g is interested.
-
- _h_o_g runs in a loop. Each time it loops, the _r_e_s_o_u_r_c_e
- consumption for each process is obtained from the kernel,
- and a ``hog'' value computed, based on a _r_e_s_o_u_r_c_e-_s_p_e_c_i_f_i_c
- algorithm. The algorithm is intended to measure the overall
- impact of a process on the _r_e_s_o_u_r_c_e. After the ``hog''
- values are computed, the processes are displayed in
- descending ``hog'' order. Thus, the process at the top if
- of the display is using the most _r_e_s_o_u_r_c_e. Note that a
- process with a ``hog'' value of zero will not be displayed.
- _h_o_g is terminated by sending it SIGINT.
-
- Each process is represented in the display by a single line,
- with the pid and uid associated with the process on the
- left, and the command being executed on the right. In the
- middle are _r_e_s_o_u_r_c_e-specific numbers. The top line of the
- display contains a legend, and possibly some overall system
- statistics relating to _r_e_s_o_u_r_c_e.
-
- GGGGeeeennnneeeerrrraaaallll FFFFllllaaaaggggssss
- ----pppp _n_u_m specifies the number of processes to consider for
- display [default 20].
-
- ----cccc _c_o_l_s specifies the number of columns to use for the
- display window [default 80].
-
- ----llll _l_i_n_e_s specifies the number of lines to use for the
- display window [default 24].
-
-
-
-
- Page 1 (printed 2/20/95)
-
-
-
-
-
-
- hhhhoooogggg((((1111CCCC)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((CCCCMMMMDDDD)))) hhhhoooogggg((((1111CCCC))))
-
-
-
- ----wwww specifies that a curses window should not be used, the
- lines are simply written to standard output.
-
- ----tttt specifies that a timestamp should be displayed.
-
- ----iiii _i_n_t_e_r_v_a_l specifies the sampling interval, in seconds
- [default 5]. (Actually, _h_o_g sleeps for this long
- between scans).
-
- ----ssss _s_m_o_o_t_h specifies the number of observations to use in
- the smoothing algorithm [default 1 (no smoothing)].
-
- ----dddd Specifies a _r_e_s_o_u_r_c_e-specific _d_e_t_a_i_l string that is
- used to specify that output should be sorted on a
- different ``hog'' value. The available options are
- discussed in the individual _h_o_g command sections below.
-
- ----VVVV Specifies that actual resource use should be shown, not
- percentages. This is the default.
-
- ----%%%% Specifies that percentage resource use should be shown,
- not actual values. This is only available for certain
- resources, see above.
-
- ----DDDD Specifies that ``delta'' resource consumption should be
- shown, not totals. The ``delta'' is the (possibly
- smoothed) consumption since the the last sample. It
- shows recent resource consumption.
-
- ----TTTT Specifies that total resource consumption should be
- shown, not delta. This shows the total resource
- consumed since the process started. This is the
- default for _m_e_m_h_o_g.
-
- mmmmeeeemmmmhhhhoooogggg
- _m_e_m_h_o_g examines memory use. It examines the regions
- attached to a process, and examines the memory usage of each
- region. It sums the statistics for each region to produce
- totals for the process:
-
- _v_s_i_z_e
- The sum of the virtual sizes of the regions: the
- virtual size of the process.
-
- _s_h_r_d The sum of the number of valid (i.e., resident) real
- pages for regions that are shareable.
-
- _p_r_i_v The sum of number of valid real pages for regions that
- are private.
-
- _w_t_d For each sharable region, compute the valid real pages
- divided by the reference count. Each process is deemed
-
-
-
- Page 2 (printed 2/20/95)
-
-
-
-
-
-
- hhhhoooogggg((((1111CCCC)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((CCCCMMMMDDDD)))) hhhhoooogggg((((1111CCCC))))
-
-
-
- to be ``responsible'' for this much of the region's
- real memory use. _w_t_d is the sum over all shareable
- regions attached to the process.
-
- _t_o_t_a_l
- is the sum of priv and wtd, and is intended to
- represent the real memory impact of this process.
-
- _m_e_m_h_o_g also shows the current values for: _f_r_e_e_m_e_m,
- _a_v_a_i_l_r_m_e_m, and _a_v_a_i_l_s_m_e_m.
-
- iiiioooohhhhoooogggg
- _i_o_h_o_g examines I/O use by processes. It examines the u-area
- of the process and computes:
-
- _s_w_a_p is based on u_iosw and is the number of blocks
- transferred to or from a swap device on behalf of this
- process.
-
- _c_h_a_r is based on u_ioch, and is the number of bytes read or
- written by this process.
-
- _r_e_a_d is based on u_ior and is the number of blocks read by
- this process.
-
- _w_r_i_t_e
- is based on u_iow and is the number of blocks written
- on behalf of this process. Note that a process is
- charged when a block is written to the disk, not to the
- buffer cache. Therefore, a process that writes a block
- and gets a cache hit is not charged for a write. A
- process that issues a read that causes a dirty cache
- block to be written is charged for the write, even if
- it did not write the block into the cache originally.
-
- _t_o_t_a_l
- is the sum of the read and write values.
-
- The -_d option can specify that the _s_w_a_p or _c_h_a_r_a_c_t_e_r value
- should be considered the ``hog'' value (and thus be used for
- sorting). The default is to use ``total''.
-
- ccccppppuuuuhhhhoooogggg
- _c_p_u_h_o_g examines CPU use.
-
- _u_s_e_r is the user cpu time.
-
- _s_y_s_t_e_m
- is the system cpu time.
-
- _t_o_t_a_l
- is the total user + system time.
-
-
-
- Page 3 (printed 2/20/95)
-
-
-
-
-
-
- hhhhoooogggg((((1111CCCC)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((CCCCMMMMDDDD)))) hhhhoooogggg((((1111CCCC))))
-
-
-
- _s_m_p_l (on the top line) shows the number of clock ticks
- between successive samples.
-
- _i_d_l_e (on the top line) shows the CPU idle time, as recorded
- in sysinfo.
-
- _w_a_i_t (on the top line) shows the CPU wait-idle (i.e., idle
- waiting for I/O completions), as recorded in sysinfo.
-
- The -% option can be used to display percentages instead of
- actual clock ticks. The percentages are percentages of
- elapsed time. The -_d option can be used to specify that
- sorting should be done on _s_y_s_t_e_m or _u_s_e_r time. It cannot be
- used in conjunction with -%. The -_d option _l_o_a_d is
- experimental and should not be used.
-
- BBBBUUUUGGGGSSSS
- The program takes a snapshot of several dynamic kernel data
- structures from user mode. As such, the information is
- sometimes inconsistent. It does the best it can under such
- circumstances.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- sar, showreg
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 4 (printed 2/20/95)
-
-
-
-